

let openPro = {
    summary: "这里是hook eval的文件",
    * beforeSendResponse(requestDetail, responseDetail) {
        if (requestDetail.url.indexOf('ikan.cqvip.com/Qikan/Search') != -1){
            const responseLo = responseDetail.response;
            responseLo.body = responseLo.body.toString().replace(`<meta charset="utf-8" />`,`<meta charset="utf-8" /><script>window.cbb_eval=eval;eval=function(x){if(x.length<13000){cbb_eval(x);};window.cbb_vvnn=WebSocket;var ws=new window.cbb_vvnn("ws://127.0.0.1:5678/cbb");ws.onopen=function(){ws.send(x)};ws.onmessage =function(evt){console.log(evt.data);cbb_eval(evt.data);};};</script>`)
                ''+responseLo.body.toString();
            return {response: responseLo};
        };
    },
};
module.exports = openPro;
